home *** CD-ROM | disk | FTP | other *** search
- TimeRun (c) Command Execution Facility, TR.EXE
- Version 3.0 September 22, 1989
- Copyright (C) 1987, 1988, 1989 Henry C. Clark
-
- LICENSE INFORMATION
-
- This program is NOT free. It is copyrighted and protected under
- the laws of the State of Texas.
-
- My time, my computers, my compilers and my function libraries are not
- free either. The TimeRun (c) Command Execution Facility, Version 3.0,
- may be distributed freely under the following guidelines ONLY :
- 1) you do not alter the program
- 2) you do not receive money for anything related to the program
- NOT EVEN THE DISKETTE ( they're so cheap nowadays )
-
- If you personally are going to use TR.EXE, the TimeRun program,
- please send a license fee of U.S. 20 Dollars along with the
- registration form below to :
-
- Software Mechanics, TimeRun
- P.O. Box 832052
- Richardson, TX 75083
- U.S.A.
-
- You MUST register and pay the license fee if you use this program in
- a commercial environment or governmental organization. Site licenses
- are available; refer to the registration form at the end of this
- document.
-
- THERE IS NO WARRANTY IMPLIED WITH THE USE OF THIS PROGRAM. THE
- ENTIRE RISK OF USING THIS PROGRAM IS YOUR'S EXCLUSIVELY, OBVIOUSLY.
-
-
- ------ Table of Contents
-
- TimeRun (c) Command Execution Facility, TR.EXE
- Version 3.0 September 22, 1989
- Copyright (C) 1987, 1988, 1989 Henry C. Clark
-
- 1.0 INTRODUCTION
- 2.0 INSTALLATION
- 3.0 USING TimeRun
- 3.1 COMMAND LINE PARAMETERS
- 3.2 RESULT MESSAGES
- 3.3 INCOMPATIBILITIES AND WARNINGS
- 4.0 THE TimeRun PROJECT
- 4.1 REGISTRATION FORM
-
-
- ------ 1.0 INTRODUCTION
-
- TimeRun ( the program TR.EXE ) is a memory resident program which
- causes execution of one to ten DOS commands at some specified time
- in the future.
-
- A good example of it's use can be found in a communications network
- monitor which runs on a PC. The network requires monitoring between
- 7:00 AM and 19:00 ( 7 PM ), the monitor program being a PC based
- program.
-
- TimeRun is used to start the monitor program at 7:00:00, and end the
- program at 19:0:0, and also to perform some housekeeping on the PC at
- 19:05:0.
-
- TimeRun will monitor up to ten target times, and is compatible with
- all programs which use the DOS keystroke functions to get command
- characters.
-
- Besides time of day operation, TimeRun will execute commands at
- specified intervals, and do so once or continuously.
-
-
- ------ 2.0 INSTALLATION
-
- TimeRun is NOT copy protected. Simply copy the TR.EXE file onto
- your normal work disk. You run TR.EXE just like any other DOS command.
-
- TimeRun Version 3.0 requires approximately 10 kilobytes of memory as
- a resident program. When you install more than one target command,
- a second copy of TimeRun modifies the first and then exits.
-
-
- ------ 3.0 USING TimeRun
-
- You run TR.EXE just like any other DOS command. TimeRun requires
- parameters which are described in the following section.
-
- TimeRun will always display an identifier message, and a result
- message based on it's ability to perform your request.
-
- In general, the keyword "successfully" is used in a result message
- to mean that TimeRun has done something, as opposed to doing
- nothing.
-
- TimeRun may be called from with batch files. TimeRun returns with
- ErrorLevel = 0 upon successful operation, and ErrorLevel = 1 when it
- has not performed anything.
-
-
- ------ 3.1 COMMAND LINE PARAMETERS
-
- TimeRun Version 3.0 has four parameter formats, three to install target
- commands, and another to request that TimeRun be removed from
- memory.
-
- The general format of the target command installation command is :
-
- TR hh:mm:ss command [n,c]
-
- The target time field, 'hh:mm:ss', is composed of a one or two digit
- hour ( 00 through 23 ) and a one or two digit minute ( 00 through 59
- ) and a one or two digit second separated by colons ( : ). You may
- install more than one command using the same target time, and they
- will be executed in succession in the order installed.
-
- The target command field, 'command', is any string up to 12
- characters in length. The command field may be a single word or
- several words enclosed in quotes ( "command parm" ). If the command you
- require is longer than 12 characters, use a batch file or similar
- mechanism. If you use "" with nothing inside, TimeRun simply
- executes an <ENTER> key press.
-
- Two options are available which modify the calculation of the target
- time for a command. Either option may be specified, but not both (
- only the first will take affect ). When using an option, the time
- field becomes an increment, not a time of day.
-
- 'N' OPTION
-
- The 'n' option causes the time field, 'hh:mm:ss', to become an
- INCREMENT value from the current time. For example, suppose it is
- exactly 8:00:00 when you enter the command :
-
- TR 0:1:0 dir n
-
- TimeRun will execute the 'dir' command in exactly one minute, at
- 8:01:00. Read the 'n' as 'IN', as in : execute a command IN so many
- hours, minutes and seconds".
-
- 'C' OPTION
-
- The 'c' option also causes the time field to become an INCREMENT
- value, but each time the command is executed, a new target is
- calculated using the same INCREMENT time value. For example, suppose
- you enter the command :
-
- TR 0:1:0 "" c
-
- TimeRun will execute an <ENTER> in one minute, and once each minute
- after that, until TimeRun is removed from memory. Unlike the 'n'
- option, which only installs a command to run once per day, the 'c'
- option provides a way to execute commands continuously at a given
- interval. Read the 'c' as 'CONTINUOUS', as in : execute a command
- EVERY so often, CONTINUOUSLY.
-
- A time field value of 00:00:00 ( or 0:0:0 ) will mean midnight
- execution with no options, immediate execution of the command using
- the 'n' option, and is an illegal time value for the 'c' option.
-
- The format of the TimeRun remove from memory command is :
-
- TR -
-
- Simply use the minus character ( - ), and TimeRun is removed from
- memory, which implies that no targeted commands will be executed.
-
- If you have installed memory resident programs after TimeRun,
- removing TimeRun first will leave a hole in your memory map.
- ( So don't do that, remove them in reverse order ! )
-
- Using the network monitor example from the introduction section,
- the following commands are used in the autoexec.bat file for the
- PC :
-
- TR 07:00:00 nminit
- TR 19:00:00 "end netmon"
- TR 19:05:00 nmclean
-
- The command 'nminit' and 'nmclean' are batch files; 'end nm' is a
- command to the network monitor program. Note that these time values
- will remain in effect for every day, until the PC is powered off
- or TR is removed from memory.
-
- Another example is the keep-alive for a communications program.
- Using the command :
-
- TR 0:1:0 "" c
-
- before executing your communications program will generally cause
- the sending of an <ENTER> to the host computer.
-
- ------ 3.2 RESULT MESSAGES
-
- The following messages imply that TimeRun has performed some
- useful function :
-
- TimeRun successfully installed. : TR resident and first target
- TimeRun successfully added target.: second through tenth target
- TimeRun successfully removed. : '-' option, TR deinstalled
-
- The following message is output when TimeRun is NOT called with
- the proper number or type of parameters. Issuing the command TR
- with no parameters will generate this text as a help message :
-
- TR hh:mm:ss command [n,c] installs a target command.
-
- hh hours, mm minutes, ss seconds must be specified.
- options : n is increment time, c is continuous increment.
-
- TR - removes TimeRun from memory.
-
-
- The following messages are TimeRun error reports and are self
- explanatory :
-
- Use 00 through 23 for hour value.
- Separate hour from minute with a colon ':'.
- Use 00 through 59 for minute value.
- Separate minute from second with a colon ':'.
- Use 00 through 59 for second value.
- Unrecognized option.
- Can't specify continuous increment of 00:00:00.
- Max command length is 12 characters.
- Target slots exceed 10 entries.
- Can't install timer vector.
- No copy of TimeRun to remove.
- Can't remove TimeRun.
-
- The following messages are run time errors, for which there are
- several causes, not to mention a bug in TimeRun. Over one hundred
- tests have been performed with TimeRun, but your computer may be
- different. Be very careful when you see a message such as :
-
- Null pointer assignment.
- Stack overflow.
-
-
- ------ 3.3 INCOMPATIBILITIES AND WARNINGS
-
- TimeRun uses a technique called 'keyboard buffer stuffing' to send
- the target commands to DOS for interpretation and execution. This
- method implies that programs which do not use the standard DOS
- key buffer character input functions will not receive commands.
- There were several applications programs that were not compatible,
- or which affected a delay in the TimeRun commands in previous
- versions of TimeRun. I know of none at this time. Send me a note
- if you run across one.
-
- Further, because earlier versions of TimeRun were developed under
- earlier versions of DOS, this latest version may not be compatible
- with your system.
-
- Version 3.0 of TimeRun works for MS-DOS 3.31.
-
- A keyboard enhancement program, such as CED, will receive target
- commands correctly, and TimeRun can issue a CED synonym.
-
- TimeRun can call itself as long as the command is 12 characters or
- less ( which leaves little room for a command ) :
-
- TR 10:00:00 "TR 1:0:0 m c"
-
- This is a way to place your continuous target commands on a 'even'
- time boundary. Don't try to run a TimeRun command continuously
- because you will quickly run out of target slots.
-
- TimeRun will not correctly execute special keystrokes, such as alt-
- or cntl- keys. TimeRun is limited to pure character strings.
-
-
- ------ 4.0 THE TimeRun PROJECT
-
- Version 1.0 - compiled with Microsoft C version 4.0 using Blaise C-Tools+
- 3.0, small model.
-
- TimeRun is written entirely in C ( well, i didn't care to look at
- any library source code, thank you ) and suffers from extreme
- resident size because of the ordering of CODE and DATA segments by
- the compiler and libraries.
-
- Version 2.0 - added time increment and continuous options, used
- Microsoft Asesmbler 4.0 to :
- a. remove dead code after exit calls
- b. use int 21 string output macro instead of puts()
- NOTE to programmers : this saved 3000 bytes.
- c. replaced far memory library routines with ASM language code
-
- Well, the result is two added features and a 6000 byte memory savings!
-
- Version 3.0 - removed system idle checks to allow operation under
- DOS 3.3. Hopefully, all those folks who were trying to use the old
- DOS 2.1 version will be statisfied.
-
- Future : It occurs to me that several new assembly language
- techniques can be used to further reduce the size of TimeRun in
- memory.
-
-
- /*------------------------------------------------------------------*/
- TimeRun Command Execution Facility
- Registration Form and Payment Invoice
-
- PLEASE PRINT :
-
- Name _______________________________________
-
- Address _______________________________________
-
- _______________________________________
-
- _______________________________________
-
- Phone _______________________________________
-
-
- Version ________________ Date Received ________________
-
-
- ( ) Enclosed is U.S. ____________ Dollars for ___________ copies
-
- of the TimeRun Command Execution Facility at
-
- U.S. 20 Dollars each.
-
- ( ) Enclosed is U.S. ____________ Dollars for ___________ copies
-
- of customized TimeRun Command Execution Facility at
-
- U.S. 50 Dollars each.
-
- Enter customization parameters : ___________________________
-
- ____________________________________________________________
-
- ( ) Enclosed is U.S. 1000 Dollars for 50 or more copies
-
- of the TimeRun Command Execution Facility, site license.
-
-
- Send this form with check or money order to :
-
- Software Mechanics, TimeRun
- P.O. Box 832052
- Richardson, TX 75083
- U.S.A.
-
- /*------------------------------------------------------------------*/
-